/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pokemon.dto;

import java.sql.Date;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.pokemon.adapters.DateAdapter;
/**
 *
 * @author Martin Strasek
 */
public class TrainerDTO {
    private Long id;
    private String firstName;
    private String lastName;
    
    private Date birthDate;

    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }
    
    @XmlJavaTypeAdapter(DateAdapter.class)
    public Date getBirthDate() {
        return birthDate;
    }
    
    public void setBirthDate(Date birthDate) { 
        this.birthDate = birthDate; 
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 13 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TrainerDTO other = (TrainerDTO) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Trainer{" + "id=" + id + ", firstName=" + firstName + ", lastName=" + lastName + ", birthDate=" + birthDate + '}';
    }
    
}